import React, { Component } from "react";
import {Route, NavLink} from 'react-router-dom';
import Message from "../Message/Message";
import News from "../News/News";

export default class Home extends Component {
    render() {

        console.log(this.props);

        return (
            <div className="panel">
                <div className="panel-body">
                    <h3>我是 Home 的内容</h3>
                    <hr />
                    <div>
                        <ul className="nav nav-tabs" style={{border:'none'}}>
                            <li>
                                <NavLink className="list-group-item" to="/home/news">新闻</NavLink>
                            </li>
                            <li>
                                <NavLink className="list-group-item" to="/home/message">消息</NavLink>
                            </li>
                        </ul>
                        <hr />
                        <div>
                            <Route path="/home/news" component={News} />
                            <Route path="/home/message" component={Message} />
                        </div>
                    </div>
                </div>
            </div>
        );
    }
}
